export default {
  // Global page headers: https://go.nuxtjs.dev/config-head
  head: {
    title: 'web-nuxt-lzq',
    htmlAttrs: {
      lang: 'en'
    },
    meta: [{
        charset: 'utf-8'
      },
      {
        name: 'viewport',
        content: 'width=device-width, initial-scale=1'
      },
      {
        hid: 'description',
        name: 'description',
        content: ''
      },
      {
        name: 'format-detection',
        content: 'telephone=no'
      }
    ],
    link: [{
      rel: 'icon',
      type: 'image/x-icon',
      href: '/favicon.ico'
    }]
  },

  router: {
    middleware: 'auth',
    extendRoutes(routes, resolve) {
      // console.log(routes);
      routes.push({
        name: 'root',
        path: '/hyy',
        component: resolve(__dirname, 'pages/index.vue')
      })
    }
  },
  // loading: {
  // 	color: "#339",
  // 	height: "3px"
  // },
  loading: '~/components/loadding.vue',
  // Global CSS: https://go.nuxtjs.dev/config-css
  css: [
    'assets/css/translation.css',
    'element-ui/lib/theme-chalk/index.css'
  ],

  // Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
  plugins: [
    '~/plugins/route',
    {
      src: '~/plugins/axios',
      ssr: true
    },
    {
      src: '~/plugins/element-ui',
      ssr: true
    }
  ],

  // Auto import components: https://go.nuxtjs.dev/config-components
  components: true,

  // Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules
  buildModules: [],

  // Modules: https://go.nuxtjs.dev/config-modules
  modules: [
    '@nuxtjs/axios',
    'cookie-universal-nuxt',
    // '@nuxtjs/style-resources'
  ],

  buildModules: [
    '@nuxtjs/style-resources'
  ],

  styleResources: {
    scss: [
      '@/assets/scss/index.scss'
    ]
  },

  axios: {
    proxy: true,
  },

  proxy: {
    '/service-zhwg-topo': {
      target: "http://localhost:9535",
      chageOrigin: true,
      pathRewrite: {}
    }
  },

  // Build Configuration: https://go.nuxtjs.dev/config-build
  build: {
    transpile: [/^element-ui/],
  }
}
